<style scoped="scoped" lang="scss">
	@import "./../../static/iconfont/iconfont.css";
	@import "./main.scss";
</style>
<template>
    <view class="main">
		<view class="header">
			<!-- #ifdef MP-WEIXIN -->
			<view class="icon" @tap="showRightDrawer">
				<view class="iconfont icon-wodeshenqing"></view>
			</view>
			<!-- #endif -->
		</view>
		
		<view class="content">
			<view class="top">
				掌握度<text>0</text>%
			</view>
			<view class="bottom">
				<view class="li">
					<text class="text1">0</text>
					<text>错题</text>
				</view>
				<view class="li">
					<text class="text1">0</text>
					<text>收藏</text>
				</view>
				<view class="li lastli">
					<text class="text1">0</text>
					<text>笔记</text>
				</view>
			</view>
		</view>
		<view class="my_study">
			<view class="ul">
				<view class="li iconfont icon-icon"></view>
				<view class="p">我的课程</view>
			</view>
			<view class="ul">
				<view class="li iconfont icon-shequ-active"></view>
				<view class="p">资讯公告</view>
			</view>
			<view class="ul">
				<view class="li iconfont icon-shezhi"></view>
				<view class="p">学习闹钟</view>
			</view>
			<view class="ul">
				<view class="li iconfont icon-zhibo-01"></view>
				<view class="p">直播</view>
			</view>
			<view class="ul">
				<view class="li iconfont icon-qingnianjiaoshijiaoxuejinengjingsaishenbao"></view>
				<view class="p">课程</view>
			</view>
			<view class="ul">
				<view class="li iconfont icon-huojiang"></view>
				<view class="p">报班</view>
			</view>
			<view class="ul">
				<view class="li iconfont icon-wurenjiashi"></view>
				<view class="p">考试</view>
			</view>
			<view class="ul">
				<view class="li iconfont icon-icon"></view>
				<view class="p">扫一扫</view>
			</view>
		</view>
		<!-- 课程分类 -->
		<view class="curriculum_type">
		</view>
		<!-- 章节练习 -->
		<view class="chapter_exercises">
			<view class="h1">章节练习</view>
			<view class="ul">
				<view class="li">
					<view class="left">
						<view class="yuan"></view>
					</view>
					<view class="midle">
						<view class="top">第一章 职业概览</view>
						<view class="bottom">
							<slider class="slider" value="60" disabled max="180" backgroundColor="#ECEDEF" block-size="10" />
						</view>
					</view>
					<view class="right">
						<view class="top">60/180</view>
						<view class="bottom iconfont icon-zhangjielianxi"></view>
					</view>
				</view>
				<view class="li">
					<view class="left">
						<view class="yuan"></view>
					</view>
					<view class="midle">
						<view class="top">第二章 教育法律法规</view>
						<view class="bottom">
							<slider class="slider" value="60" disabled max="180" backgroundColor="#ECEDEF" block-size="10" />
						</view>
					</view>
					<view class="right">
						<view class="top">60/180</view>
						<view class="bottom iconfont icon-zhangjielianxi"></view>
					</view>
				</view>
				<view class="li">
					<view class="left">
						<view class="yuan"></view>
					</view>
					<view class="midle">
						<view class="top">第三章 教育职业道德规范</view>
						<view class="bottom">
							<slider class="slider" value="60" disabled max="180" backgroundColor="#ECEDEF" block-size="10" />
						</view>
					</view>
					<view class="right">
						<view class="top">60/180</view>
						<view class="bottom iconfont icon-zhangjielianxi"></view>
					</view>
				</view>
			</view>
		</view>
		
		<!-- 侧边导航 -->
		<uni-drawer :visible="rightDrawerVisible" mode="left" @close="closeRightDrawer">
			<view class="uni-drawer">
				<view class="uni-title">
					<text>中学</text>
					<text @tap="tab_subject">切换科目 ></text>
				</view>
				<view class="uni-list">
					<view class="uni-list-cell" hover-class="uni-list-cell-hover">
						<view class="uni-list-cell-navigate uni-navigate-right" @tap="item1">
							中学综合素质
						</view>
					</view>
					<view class="uni-list-cell " hover-class="uni-list-cell-hover">
						<view class="uni-list-cell-navigate uni-navigate-right" @tap="item2">
							中学教育知识与能力
						</view>
					</view>
				</view>
			</view>
		</uni-drawer>
    </view>
</template>

<script>
    import {
        mapState
    } from 'vuex'
	import uniDrawer from '../../components/uni-drawer.vue';
    export default {
		components: {
			uniDrawer
		},
		data() {
			return {
				rightDrawerVisible: false
			}
		},
        onLoad() {
			// 动态设置当前页面的标题。/
			uni.setNavigationBarTitle({
				title: '中学综合素质'
			});
		},
		onNavigationBarButtonTap(e) {
			this.rightDrawerVisible = !this.rightDrawerVisible
		},
		// 监听下拉刷新
		onPullDownRefresh(){
			setTimeout(function () {
				uni.stopPullDownRefresh();//停止刷新
			}, 1000);
		},
		methods: {
			//关闭侧边栏
			closeRightDrawer() {
				this.rightDrawerVisible = false;
			},
			//显示侧边栏
			showRightDrawer() {
				this.rightDrawerVisible = true;
			},
			item1() {
				this.rightDrawerVisible = false;
				uni.showToast({
					title: 'item1'
				});
			},
			//切换科目
			tab_subject(){
				uni.navigateTo({
					url:"../index-list/index-list"
				})
			},
			item2() {
				this.rightDrawerVisible = false;
				uni.showToast({
					title: 'item2'
				});
			},
			confirm() {
				uni.showToast({
					title: '搜索'
				})
			}
		},
		
    }
</script>
